<?php
/**
* @author: Nguyen Thanh Tung
* @date: Monday, January 27, 2014
*/
if( !isset($AppUI) ||
	!isset($_SESSION['stadium']) ||
	(isset($_SESSION['stadium']) && ($_SESSION['stadium']&1<<2)==0)	
	/*|| 
	(isset($AppUI->id) && !in_array($AppUI->type, array(ROLE_ROOT, ROLE_ADMINISTRATOR)))*/
) {
	redirect(HOST_BACKEND);
}
$this->load->model('stadium_model', 'stadium');
$intStadiumId   = (int)$this->input->get('stadiumid', 0);
$row            = $this->stadium->get($intStadiumId);
$this->smarty->assign('dateOpen',CI_Function::datevn($row['open']));
$this->smarty->assign('dateClose',CI_Function::datevn($row['closed']));
//$this->smarty->assign('active',(int)$row['active']);
$this->smarty->assign('row', $row);

$this->smarty->display('stadium/edit.tpl');